import request from '@/utils/request'

export default {

  // 列表接口
  getList(data) {
    return request({
      url: '/gxh/channel/list',
      method: 'post',
      data: data
    })
  },

  // 删除
  delChannel(channelId) {
    return request({
      url: `/gxh/channel/del/${channelId}`,
      method: 'post'
    })
  },

  delChannelBatch(channelIds){
    return request({
      url: '/gxh/channel/del',
      method: 'post',
      data: channelIds
    })
  },

  // 新增
  addChannel(data) {
    return request({
      url: '/gxh/channel/add',
      method: 'post',
      data: data
    })
  },

  // 修改
  updateChannel(data) {
    return request({
      url: '/gxh/channel/update',
      method: 'post',
      data: data
    })
  },

  // 详情
  detailChannel(channelId) {
    return request({
      url: `/gxh/channel/detail/${channelId}`,
      method: 'post',
    })
  }

}
